package org.example.controller;

import org.example.service.AdvertisementService;
import org.example.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/advertisement")
public class AdvertisementController {

    @Autowired
    private AdvertisementService advertisementService;

    @GetMapping("/imageurl/{position}")
    public Result advertisement(@PathVariable Integer position){

        String url = advertisementService.advertisement(position);
        return Result.success(url);



    }

}
